#@layout()
#define main()
	<div>
		<div style="margin:5px 0;border-bottom:1px solid #aaa;">
			<span class="layui-breadcrumb">
				<a href="#">服务接口说明</a>
				<a><cite>接口调用日志</cite></a>
			</span>
        </div>
		<form id="form1" class="layui-form" action="xpApi/callLog" method="post" style="padding:0px 0 0 20px;">
			<div class="layui-form-item" style="margin-bottom: 0;">
				<div class="layui-inline">
					<label class="layui-form-label" style="width:90px;">开始日期</label>
					<div class="layui-input-inline">
						<input type="text" id="beginTime" name="beginTime" value="#(beginTime??)" lay-verify="" autocomplete="off" placeholder="yyyy-mm-dd"  class="layui-input">						
					</div>
				</div>
				<div class="layui-inline">
					<label class="layui-form-label" style="width:90px;">终止日期</label>
					<div class="layui-input-inline">
						<input type="text" id="endTime" name="endTime" value="#(endTime??)" lay-verify="" autocomplete="off" placeholder="yyyy-mm-dd"  class="layui-input">						
					</div>
				</div>
			</div>
			<div class="layui-form-item" style="margin-bottom: 0;">
				<div class="layui-inline">
					<label class="layui-form-label" style="width:90px;">接口名称</label>
					<div class="layui-input-inline">
						<input type="text" name="name" value="#(name??)" lay-verify="" autocomplete="off" placeholder="请输入接口名称" class="layui-input">						
					</div>
				</div>
				<div class="layui-inline">
					<label class="layui-form-label" style="width:90px;">用户名</label>
					<div class="layui-input-inline">
						<input type="text" name="userName" value="#(userName??)" lay-verify="" autocomplete="off" placeholder="请输入用户名" class="layui-input">						
					</div>
				</div>
				<div class="layui-inline">
				<button class="layui-btn layui-btn-sm" lay-submit="" lay-filter="demo1">查询</button>
				<button class="layui-btn layui-btn-sm" lay-submit="" lay-filter="demo2">统计</button>
				</div>
			</div>
		</form>
	</div>
		<table class="layui-table" lay-even="">
			<colgroup>
				<col width="80">
				<col width="100">
				<col width="100">
				<col width="100">
				<col width="300">
				<col width="100">
				<col>
			</colgroup>
			<tr>
				<th >序号</th>
				<th >接口名称</th>
				<th >用户名</th>
				<th >调用时间</th>
				<th >参数</th>
				<th >IP</th>
			</tr>
			
			#for(x : lists.getList()??)
			<tr>
				<td >#((lists.pageNumber-1)*lists.pageSize+for.index+1)</td>
				<td >#(x.name)</td>
				<td >#(x.userName)</td>
				<td >#(x.gxsj)</td>
				<td >#(x.param)</td>
				<td >#(x.ip)</td>
			</tr>
			#end
		</table>

	<div id="_paginate"  style="margin-left: 10px;"></div>
	<script type="text/javascript">
		layui.use(['element','form','laydate'], function(){
			var form = layui.form
			,layer = layui.layer
			,laydate = layui.laydate;
			laydate.render({
			    elem: '#beginTime' //指定元素
		  	});
			laydate.render({
			    elem: '#endTime' //指定元素
		  	});
		  var element = layui.element; //导航的hover效果、二级菜单等功能，需要依赖element模块
		  
		  //监听导航点击
		  //element.on('nav(demo)', function(elem){
		    //console.log(elem)
		    //layer.msg(elem.text());
		  //});
			//监听提交
			form.on('submit(demo1)', function(data){
				data.form.action="xpApi/callLog";
					//layer.alert(JSON.stringify(data.field), { title: '最终的提交信息1' });
					//return false;
//				$("#userID").removeAttr("disabled");
			});
			form.on('submit(demo2)', function(data){
				data.form.action="xpApi/callStats";
				//layer.alert(JSON.stringify(data.field), { title: '2最终的提交信息' });
				//return false;
//			$("#userID").removeAttr("disabled");
			});
		});
	
		$(function(){
			xpsoft.paginate("_paginate",#(lists.pageNumber??1), #(lists.totalRow??1), "#(BASE_PATH)/xpApi/calllog","form1");	
		});
		
	</script>
#end